from django.urls import path
from rest_framework.routers import DefaultRouter
from .views import SurveyRecordViewSet, SurveyImageViewSet, FavoriteLocationViewSet
from .api_stats_views import APIStatsAPIView, UserAPIStatsView

router = DefaultRouter()
router.register(r'surveys', SurveyRecordViewSet, basename='survey')
router.register(r'images', SurveyImageViewSet, basename='image')
router.register(r'favorites', FavoriteLocationViewSet, basename='favorite')

urlpatterns = router.urls + [
    path('stats/', APIStatsAPIView.as_view(), name='api-stats'),
    path('stats/user/', UserAPIStatsView.as_view(), name='user-api-stats'),
]